<%@  Language="C#" Inherits="System.Web.Mvc.ViewUserControl<SubsidyApp.Controllers.ContentFormViewModel>" %>

<%= Html.ValidationSummary("Please correct the errors and try again.") %>
<% using (Html.BeginForm())
   { %>
<% Html.RenderPartial("UserScripts"); %>

<fieldset>
    <div id="edit">
        <p>
            <label for="content_title">
                Page Title:</label>
            <%= Html.TextBox("content_title", Model.site_content.content_title)%>
            <%= Html.ValidationMessage("content_title", "*")%>
        </p>
        <p>
            <label for="distrib_id">
                Distribution</label>
            <%= Html.DropDownList("distrib_id", Model.Distributcions, Model.site_content.distrib_id)%>
            <%= Html.ValidationMessage("distrib_id", "*")%>
        </p>
        <p>
            <label for="content_body">
                Page Body:</label>
            <%= Html.TextArea("content_body", Model.site_content.content_body, new { id = "HtmlContent" })%>
            <%= Html.ValidationMessage("content_body", "*")%>
        </p>
        <p>
            <label for="content_approved">
                Page Appoved:</label>
            <%= Html.CheckBox("content_approved", Model.site_content.content_approved)%>
            <%= Html.ValidationMessage("content_approved", "*")%>
        </p>
        <p>
            <label for="content_created">
                Create Date:</label>
            <%= Html.TextBox("content_created", Model.site_content.content_created, new {@readonly = "true" })%>
            <%= Html.ValidationMessage("content_created", "*")%>
        </p>
        <p>
            <input type="submit" value="Save" />
        </p>
    </div>
</fieldset>
<% } %>
<a href="javascript:history.back();">[back]</a>
